Clinton's startling new.
So this is today we will it is our first day in the advanced topic, why we are going to advance topics.
This is day one since it was planned for today to start creating custom reports and exploring the traffic
chart, since these two topics are not ready to deliver.
It is requiring data entry to show the result as a chart and reports so it is not ready to deliver.
These two topics will come back to these topics once they are ready.
The other three topics you are all working with currencies implementing.
Terms of implementing content pagination, these three point twenty one twenty two twenty three are
dependent on topic number nine.
So we have to deliver number nine and go back to this twenty one, twenty 23 three.
So that's why today we start the first topic in the advance of the.
But OK, this is expen.
So that's why maybe some of you are asking why we start advancing topics today.
So this is why I give the reason.
So if you have questions on previous topics, so if you have any questions, please let me know before
starting the today's.
Anyone have questions?
OK, OK, so, Karen, can you start today's topics, please?
Yes.
OK, thank you, Mummy, for explaining that.
I saw I saw an e-mail from emails from some of us who wanted the clarification.
Thank you for the clarification.
Yeah.
So the item number nine that Mummy is talking about is on advanced topics.
It's working with the bootstrap theme.
So we need to first of all, he's told our theme.
Let me show my screen so that we can be together.
So we have to we have to, first of all, install the bootstrap them.
Number nine, the item that I have highlighted so that we can be able to do you on air routing, working
with currencies and implementing content.
But item number 24, the front page ad and custom reports, we are going to take that when we have the
data ready so that we explore the web.
So today we are going to look at working with comptrollers Aughrim and Escadrille in Froben and also
in Europeanised.
And this is one of the most important things in in actually not only in Europe next of Rapid, but in
in the programming language or any framework that you want to learn.
You need to understand how controllers work because controllers is what carries the logic of the whole
application wiring.
And it's a real fear of of interacting with the database.
And yeah, basically interacting.
The data is either getting the data from them or storing data into the database.
Then, of course, now once you get the data from the database, you, you manipulate that data using
the controllers.
And then the other thing is what the controllers do is when you get data from the users, the data is
received into the controllers.
If there is any need to process the data, it is processed and then it is stored into the database.
Either you also need to do that via Aughrim or Esquibel, whichever you prefer.
So this is what you are going to be doing today.
I go to our instanced.
And I have done something here in our article liberally.
At the Library of People library, I have got something something here, but even before before we go
to what I have done here, or maybe I should explain to you that what we want to achieve in what I have
done here, I have added two things.
The first one is this checkbook's here that is reading truck by us and.
Truck by, so I have had enough both just below our first column where we head to the post again, this
I feel that we added, I have added succubi us.
And ideally what what I am doing with this is just for the purpose of this training I want.
When this cheque book is Checkbook's is checked, we can be able to track the buyers who have purchased
this particular item or who, assuming that this item is for sale, we want to be able to track the
people who have bought it.
And so what they have done, I have added this child table below.
Our articles are DOCTYPE, which is reading by us.
So ideally I created a chart table, not a turntable, but adopted.
So if I go to the police, you'll see here that they have another paper that I have created inside of
our module called the Buyer.
And this duct tape is our third table.
So remember, if you need to do this, if you need to create a charitable, you have to check this.
Checkbook's allowing your application to treat this particular DOCTYPE as adjustable.
And then I have other Driffield just for our testing today, the full name, the email and the phone
number.
And that is what we can see here, full name and phone number.
So I have connected those two.
So I would like this thing to work if this checkbox is not checked.
So if Tilak bias is not checked, ideally we are not supposed to be tracking by us inside of this article.
And therefore you cannot add.
Biagio, if you try to add that via here, then the system after you try to save the system is going
to give you a message and a warning that instead of this DOCTYPE, we can't track bias.
And if you check this checkbox you have allowed this doctor to track by us and now you can add as many
bios here as we want.
So we are going to be seeing how to implement that today.
Before we go there, let us go to our let's go to our instance here.
Close this, increase the font and see how are going to do this.
This is our instance that is running on the other tab so we can leave it running and we can work on
this one.
So how do you get to the how do you get how do you try to interact with them?
Some of us who are Python developers, we know how important the Python shell is.
It's like our daily life.
It is where we go when we need to to test the things and see whether they are lacking even before we
put them into our application and how we do that instead of wrapping it up and doing console and console.
And sometimes if you have multiple sites, you may need to specify the site so you can do Bankside.
I think ours is frappé training and then Brynn's console repetition doesn't exist.
OK, I misspelled frappé.
So this is proper training.
I mean say the console.
So if you have multiple sites, let me exit here because we have one site we are able to do the console
and this beeswax.
But if you have multiple sites into your existence, for instance, if you have a production instance,
it's likely very highly, very likely that you're going to be having multiple, multiple sites in application.
And therefore, this command will be helpful.
We will be needing to specify the sites that you want to access from the from the console.
So is going to this.
Console.
So this is the dream.
So I have my console here, and if we need to start working with this, not only this this duct tape,
we can import it inside of our console.
And remember, having logged in here, let me clear this so that we have some room having logged in
here.
Inside of this basically means I have access now to all the duct tape inside of that.
So I may not need to import them here like we normally do in jungle or other python.
Three months I we already have, Avita, so I can see something like that because of course because
equals and then I do frappé don't get don't get it.
OK, remember it's it's a function that we use to get the documents.
In this one, I told you, I think that they expect to Parramatta's the first parameter is the name
of your duct tape.
Our duct tape here is a particle optical particle library into the second parameter is the primary key
of the article that you want to access.
So I am going to split this so that I, first of all, get the primary key of my article, at least
one article that I want to if I want to access.
And I'm going to do this one is in Karani, so we need to go to our bench use, so we need to do some
pseudo soup and we switch and we provide a password and we can go to bench and training and we can do
a bench.
Maria, be remember, this is the other commands that you can use to access your database.
This is the this is the Esquibel section.
And with that, I have I have my instance.
I have my thumb opened up here and I can try to see what is in this what we have here.
As a primary key, so I can do select select name from and because if a person is here, this this,
of course, will not be prevented with the tab.
And because we have our piece I remember I mentioned this because we have our space in between the name
of our our DOCTYPE here.
We will need to supply a.
Yeah, but this is those people that are using that are using Linux that are not on MapQuest.
It is to the farthest end of your screen to the left, just below the Sipkin.
So if you try to use you try to use our single, he is not going to work.
I think it is not going to work.
You are not.
You need to use a bucket.
And here we see we have very articles in the name which ERP next and treats as the primary key by default
has these three.
So we can get something like this article name.
I copy this and then we bring it to our, to our, our query placed it there and then we run it.
And you see this as this is successful.
If we don't get an error, that means this thing is successful.
So if we try to do articles, we copy this command and we we sit down here.
We should get some articles.
Yeah.
So we see this one is is an object.
We our article and the name of the article is this article.
This test article is what we have is what we have is what we have here is what we have, which is what
we have.
Is what we have here.
This is the test article.
So if we need, for instance, how do we get out?
We have that this article, how do we get the children, the children inside of that this article?
This is very, very important.
Up next, in Europe, it handles it differently.
If we need to get it from our Aughrim here, we can just do something like Atticus, which is the variable
we have here, not the name of our talented people.
Many of the people here is by us.
So if we do if we do that, don't by us, we should get our article here.
And yes, we have one item inside of this.
And how do we precisely see what is inside here?
We can look we can do a loop that that loops through all the items we have here and extract each of
them.
So just like we do in Numberplate, when we can just come here ordinary, by then we can just come here
and see for article in byas articles to buy us.
Remember, this is the name of the variable used here, because this variable contains everything when
we pick this this thing has everything inside of this article, whether it is on the on the part here
or it is down here that's on the table.
This is this particular variable has everything you need.
So we can see for Addicott in this print.
And we want to print what we want to print article.
You can copy this.
Article dot, something like we can do article the full name, we see what we have here, so article
don't fool and ask him what we have.
Free community, good.
So free community is what we have down here.
So if you wanted the email or the phone number, we can do likewise.
We can just get this email and like that to be able to access everything that is inside of our chat
table.
Now that is that is inside our that is inside the console here.
Now, there is one thing that I want to point out very, very, very, very clearly.
Europeanised does not handle relationships the way we are used to handling them, hopefully hoping that
you have you you handle them the way we used to do here.
If you go to the application here and we open our instance training, we are expecting that when we
look at this doctype IDOC that we have here, this is the parent.
So this, these things are children, so they depend on this one.
We are expecting that inside of this parent we have like maybe our primary key or maybe something like
our foreign key.
Yeah.
Our foreign key here with the children.
But unfortunately in frappé that is, that is not how they do it.
So if we go to our Artecoll Library table, we can be and look for the article I Braly article brought
is here and we open it.
We are expecting that we are going to see something related to bias here.
But there is nothing like that if you are not going to find it here.
And so there is no way you can get relationships off your child table from the parents, from the parents
table.
You can also do this by describing you if you don't have access to this.
I haven't personally installed my admin on my on my local machine, so I am able to access both.
But my imagination is that are going to be doing this on Asaba, which you do not need to load with
all these applications.
So how I also wanted to show you how you do that inside of you are here.
If you need to see if you need to see all you need, of course, you need to see this in you to remind
yourself we have a command like you describe, which you can use to check to check what is in tables.
So recommend you describe, for instance, if we do tab.
Article, the Vatican Library Library is letting me down today.
So, yeah, you can see we do not have the same things we are seeing here are the exact same things
we will see when we look at the structure of this table.
So what we have as a structure of this table here is exactly what we are going to see here on the description
of this table.
So you can you can just break that down around to see where there is.
So this if you look clearly, you see like a field parent here, we are going to see it on the next
table.
We also have parent food type parent food, and then we have parents full time, but we do not have
the children.
So there is no child inside of this table.
So how do we get there?
Is there a reason ships are gotten using the name, which is the primary key of the parent table?
The primary key of the parents table, which is by default name, is what is used to describe their
relationships and therefore if we open our BASTABLE here.
So let me go here and look for our BASTABLE bank by the EU, by us based here.
If we look at this table, we describe it.
We also have these three.
We have the appearance.
We have the parent, the type.
And we when we browse, just check those reviews and see what we have.
We have a parent in this time period data.
When we got back to our article, table parent does not have anything because this table is not used
as a table for any table for any doctor.
So parent is now beginning to feel this now and the parent type is now.
But when we come here, parent has data, Bradfield has data and parent type also has data.
So the parent type here contains the name of the DOCTYPE, which is the parent of our table.
The the parent field is the table, not the table, but the field inside of our parents parents table
that is there.
It is done with this table.
So if you come to your appearance, if you come to your parents table, that is the parent table tracked
by us.
Yeah, that is one.
And let me see whether I will get this field.
Now, where is this field?
So.
All I'm looking for a different field here.
Yeah, OK, so so we can look for that later, then the parent here now, this parent is their primary
key, the primary key instead of your parent table.
So the parent type contains the name of the doctor.
In this case.
It is our article.
I brought it here, our article, I really don't think.
And then there is a ship is found inside of their parents.
So any doctor that will define will have at least these to there is the parent and there is a parent
type.
Parent type is the name of the adoptive parent is the primary key.
So, for instance, here we have this is this article.
If you come back here and you scroll back, this is not this article, this latest article.
So it means this article, this particular article here, this particular relationship here is a child
of this this article.
So it is outside of this article here.
And likewise, this one test article, Nim is a child.
This Article Nim, this article name is a child of the first the first article we have here.
So that is how the relationships are defined inside of relationships, ideally are found inside of the
children, the children, they are not in their parents.
So get the child stable and then are able to get all the dog types that are related with that particular
child inside of this parent type field here.
I don't know whether this anyone who has a question up to that point before we proceed.
Garani, can you create a child table with two records and see the result, two records.
So you mean I create to like I add, for instance, here we have our article, this article.
You mean I add another Biagio?
Yes, it's another record.
Yes.
Let me add like I mean, I don't want to names to test the email is then here we have something, just
a random number and we can go ahead and save.
This does not.
So you see this the logic we are going to implement.
So let me first of all, check this so that he accepts that.
So, yeah.
So now if we come here to the table in the record, we have this.
What we have here is this detail here.
We have articulable, which is the name of our DOCTYPE, and then here we have the name, the primary
key of the article, which is the parent of this article we just created here.
So here we have this article name and here we have this article.
So these two belong to the same, the same the same article here.
Mommy.
So the relation is on the child, not the parent, correct, correct, correct, or the relationships
or the relationships are going to be so in the parent table here.
Even if I report, there's nothing that has been added.
There's nothing that has come inside of this table.
Everything is being tracked inside of this this table, this table, the child table.
So they will catch it will catch the idea of the parent table, the parent, the parent I.D. and the
parent column.
Yeah, yeah, correct, sort the parent column inside of the chart table contains the primary key of
the periodic table.
Yes.
So which is the name?
Yeah.
And the other column go the timetable for the child.
The parent feel this is what is bias.
What is this bias.
So parental field parent food here ideally carries the name of our dog.
So you see our duct tape here is caught by us.
Where is it?
Fields, no, not yet.
I need to be here.
Down here, you see the name of this one is by us.
So if you go to the description of this table, let me just do that.
Let me zoom out here a little bit.
If you go to you with customized, customized and you scroll down to where we have that bias, you see
the name, the name, the name of this table is by us.
And that is not is what is taught.
That is what is taught inside of inside of the child, the table, the parent field.
So the parent field is the name of the child, the table here, which in our case is by us.
So this is first time we saw this type of you music, the type statement.
Can you explain more at this table?
Sure, sure.
So what I did, what I did hear, ideally, first of all, I created this duct tape.
Let me take this thing here and see.
So I have saved this and let me remove this one.
Remove and see.
OK, so I created this duct tape for now, this duct tape we have is a very standard duct tape, just
library management and it is called Biya.
And now we have these three fields here.
I go to my to the other table where I do the duct tape where I will not connect to the table.
And I add a room and I call this roll by us.
And then this one is direct.
This is a table table, if you try to save first of all, this is going to tell you the options link
and thiebaud require you to give options.
So if you select if you select here that an item is a table or it is a link, you definitely want to
provide items here, options here because it needs to connect to another doctor.
So we want to connect us to buyer thereby we just created here.
So can we do buy a here save again this winter through an error is telling you that the buyer is not
at the table.
So whatever you provide here as an option will need to be to be connected to the table if you have a
table here.
So that is why in our BASTABLE, we will definitely need to select is charitable here.
So we need to check this check box and then see if it.
And then we when we have that we know is they take that and we try to update our field, this one receives.
So you are duct tape, the duct tape that you want to use as a charitable must have this is charity
project.
And then in your opinion, to DOCTYPE, you need to just select the type of this field is that table
and then you provide here, just like we are doing when we were drinking.
You provide here the duct tape name, which you need to link to our is it is via and then you update
it and that's it.
You are done.
And it's clear now, so I have a I can not cut to this question actually in ERP next, it is not recommended
to make it child of a child.
Is it correct that currently this approach or this intimate understanding?
I told of a child, you mean a child support of another child?
Yes.
Yes, I think so.
I don't have a definite answer now, but I think so.
I'm trying to figure out the youth case.
I'm trying to think of a case that you someone who may be needing to do that.
Suppose your buyer, for example, your buyer and the child would go to the front end, go to Fronton.
Is here what is the biodata child even?
Let me let me go back to sorry, let me bring you can pay article.
Yeah, so, yes, make for the view from view of the charitable form of you.
Full view of the line from a viewer for the line it did president.
Use here instead of one inmate.
Suppose I have many emails.
OK.
And this is a personal email.
This is what I will not add more fields, but I want to add the timetable here to catch.
Suppose I have one hundred email.
I said I am saying anything.
And so this e-mail to catch them, I have to insert here a child table under this rule number one to
catch e mails.
So I have to adro this is a one add another row inmate, too, and so on.
This is the kind of use case where we can do a child of a child or suppose it's very common in buying
and buying a module.
If you buy, for example, laptops, laptops, 10 laptops, and these 10 laptops will be split between
departments.
So finance will get five laptops and each child will get another five laptops.
So in the purchase order line will say, I will buy their laptops, but you have to catch the charge
account to or to consume the budget of each department.
So you need to put whether you have to add two lines in the pictures of the two lines.
So it's quantity which goes to the department or you will group them in one line and put.
You will group them in one line and you will put different distribution in under the for each line,
I will put, for example, H.R. and Tynan's, this is a common use case we will use to consume budget.
Depends on the laptops given to each department.
So here it's a use case.
It's really this case.
Is it doable in the first?
In your opinion, I'm looking at the document here which says it is not doable and I'm trying to think
through minute to minute, minute to minute to minute, minute to minute, and ships will not solve
the problem.
No, it's one too many.
OK, no, no issue, go ahead in your next.
So for the other attendees, if you have a question on previous.
Point, can you have questions?
So from what I understand is, can you open to be my edman?
Yeah, so can you open this and defend to the next step is my Head the Time article.
Yeah, this one, right.
So what I understand is it was on display here, what is the timetable or what are the time difference
here?
But the instance that is the entry, the bias, we will have the display.
What is the primary key?
Right.
Yes.
So so basically, the point of this entire explanation was that all the child tables will contain the
primary, but the parent table, it won't display any child tables, right?
Absolutely.
All right.
I can work on.
Good.
So I'm hopeful that is now clear.
OK, OK, so if you have understood that now the next thing, Mummy, I'm going to do some research
on the child of a child if it is not possible.
I also find try to find a way of our way of getting it working.
I get your use case.
It is very practical.
You may use you may have a user here who has multiple email addresses.
Yeah, it's very, very practical.
So I'll try to see how we can that can be implemented.
So then got one more thing is this.
Yeah, so so what exactly are you achieving by including the track, by irruption?
So what I was doing here, this is for the purposes of this this training, this may not make sense
in the real world, but I was assuming that you are having articles that are for sale and for some reason,
you want to track the people who buy your article in some articles and you don't need to track in other
articles.
So here we can check.
We can have our checkbooks.
This checkbooks will not work until we write some logic to tell it that if this one is checked, then
we want to track buyers for this particular article.
And therefore, when we come down here, we can be able to add buyers here.
If this one is not checked, then we don't need to track articles here and therefore we don't want to
add any articles here.
Now, this this case can be, can be, can be, can, can be, sometimes be very important in real world.
For instance, you want an action in one field to to affect the kind of actions that can be taken on
other fields, like you may be needing to make a field mandatory depending on another field.
So these are field that exists in this field is not mandatory until when other field is checked.
So this kind of logic that we will be writing today will help you be able to do those kind of things.
The other thing that I want to to to to show you with this kind of example here is remember, when you
are doing the the topics, were you able to access these fields from the front end just by getting the
document and then getting the document, the the name that you want to get?
Now, how about the back end?
How about we want to get this field and we want to manipulate another field from the back end using
this data?
That is that is what I want us to look at.
And when you look at our topic for today, they are talking about control and we are still going there
or aim is what we have been doing for them is where is it?
Is what we have been doing.
I think I removed that with Frappé to get Doc.
And then we also have Escorial ask you.
It is what we have been doing here is, is what we have been doing here.
So remember, like I said, in the production environment, you may not be able to access this.
You may not be able to access, which we might admit.
So you may be needing you may need to be very conversant with what happens here and checking the relationships
using the commander in the command line in this case is our is our skill sets that we are going to use
here.
Like, you know, here we just described that the top article, I brought it here, we can go ahead
and do the same for we can go ahead and do the same for for the top.
What is it called bya.
By at least one, this one does not have a space, we don't need to we don't need to add, we don't
need to add batiks in here.
We can see the same things.
We can see the same things that we have on the other.
On the other.
When we check the we might admit.
So this is very important.
Abdoul, I don't know the answer to your question.
Yeah, great, great, great.
Anyone else who needs a qualification?
OK, all right, so now this this is for the purposes of our testing, so how now do we radiologic to
tell our application that when we have these deject, we want we want to track by us and when we have
we checked, don't accept a bias to be added here?
Well, this is done inside of our control as instead of our controllers and controllers in Frappier,
every time you create everything, you create the.
Every time you create a new drug tape, there are things that are generated, really, they may increase
the font
that we remember.
We created a couple number of dog tapes when we were doing our library up.
And we have a folder here that contains all our dog tapes, so.
Our daughter, Pia, has attacked liberally biased what we treated earlier today or today, library
in Mumbai and all these others, and we want to work.
We want to work specifically with Article eight.
But I don't want to talk specifically article.
So when you open this, this will not in DOCTYPE, you have the tipi file that you have there or they
are two by default.
Ignore the test one.
This one is used for automated testing so you can leave that that alone.
The article library file that you have there is what takes handles all our controls.
And remember, we had no idea we had this function that we wrote here that we're supposed to do something
before it receives the document.
It all supposed to do something at the end and also give us a message.
Today, we are going to write another function inside of our article.
Every class that is supposed to do something before this evening is done.
And this one is we have a function Tramadol.
This one is a method because it is a function inside of of a class.
We have a method that has done that is code to validate this one.
I'm sure you found it in the documentation and it runs very deep runs before this is done because ideally
validity is supposed to run.
Take the data that is inside of your form here in the validated across the different validations that
we have provided.
And then if the validations pass, then the thing goes ahead and tries to check before what is false.
Even then, the logic flow continues.
So the family dysfunction takes in self and remember self here.
We are inside of a class, so every time you define a function and pass self, this self is going to
take the whatever is in the class.
So this in our case here for for today is going to contain the article library DOCTYPE and therefore
we do this self.
We are able to do a lot of things here.
If we pick if we take itself, if we take self growth, you can see all the things that we able to do
to do it ourselves here, including the including the name of you, can you can explore this on your
own.
We are out of things that you can do.
So if you do stay road, yeah, we are a number of things that we want to do, including including the
fields that are on you are DOCTYPE.
So if for instance, I wanted to do something with the other, I can do self-taught.
All the other.
Surfboat order, and I'll be able to get to do stuff with this function here.
So today we want to check.
We want to check on communities.
We want to check what is the value of the safe dirt track by us?
Truck by us is the name of the field that we created here.
If if maybe for some reason you try to do this and if you is not found, just try to check from your
customized make sure that the name of you field here, the name of your food here, remember, we be
able to give a different name.
We can call this truck by us.
And we give this a different name, we give this a completely different name, so make sure that the
name that you have here is what you are trying to access from your doctor.
And then when you when we were treating this field, I made this thing in such a way that by default,
if I edit it here by default, when we are when we are adding a new a new item, the buyer will come
check.
So it will come with a default value of one, but then you can uncheck it.
And when you enter it, the value goes back to zero.
So here what we have in our code is if self-destruct by us is zero, that means it is not checked.
Then I'm giving another condition, like if if self-torture by us, of course, to by us.
Now the buyer's here, remember is the name.
Let's go down here, the name of the table.
So what we are telling our code here is if the name he is the checkbox is not checked, then check number
two.
If our buyers object has anything self-torture by us means check whether this one has anything.
And if yes, then the this message rapido through the through method does not allow floor to continue.
If we do hear message print, if we just do message print here it is being a print message, but it
to go ahead and allow us to see if we can see if we tested.
Why we said our thing, if we come here, not here, let me go back.
I think I heard it and I really remember what you may need to hurry this together thing, watching Andy
for some reason, even after the control shift.
Ah, it doesn't work.
Try to restart yourself.
So here we have two of these guys and this one is sick.
So if I say this is going to change, what if I do something here and save?
It allows me to save.
And what if I am sick?
I want you to see what is going to happen here is going to draw, not to draw.
Yeah.
Is going to put into a message, but then it is going to go ahead and save.
So just take the message that we have here and also take the message that we have a notification that
comes up here.
So when I say it, the truth, I'm visiting me.
This article does not strike by us by then if they are saved, because ideally what we have here is
a message print.
So when you do a message print, this does not interrupt the flow of of of the application.
It prints the message for the user, but then it goes ahead and execute the next steps.
But when we do through this little function stops.
You are the control of the vehicle stops.
You are the the next steps that follow from here.
So if we do when we do this, this flow is not going to continue then the function.
The moment this one is reached, our application is going to throw this message to the user and then
it is going to stop there and wait for the next action.
So when we see that, come back here to see if they are to reload.
And we change something, let me first of all, take that so they just have something to change.
This one I saved.
But then remember, they are safe because you are tracking users.
How about if I can check it and I try to save it?
Just look at that.
They been telling us this application does not track by us.
So that means I need to remove this this tool.
So I remove that and also remove that other you.
I try to save it with this one.
I inject save it and it is successful so that they are saved.
If I come back here to try to add somebody else just to, to, to be sure.
Giuffre and yeah we have that, we have the phone number here.
I try to save with this one object.
Save it.
That does not allow me to save any, does not allow me to save any, any by ACM.
So that's it.
So this is the code we have written and this is what is used to control and interrupt flow in case we
need to check the Felisha and manipulate other fields depending on them.
I open the floor for any questions if you have.
Any question that.
OK, now now you did some code in the Python controller when you decided to put code in controller and
code in JavaScript in Java, fire, just fire.
So this one, you can do it in JavaScript, right?
You can do it, you can do it in JavaScript, Mummy, but sometimes you may need to do things here that
with this this input just before validate, you may need to do things that JavaScript can not do.
And also remember that mummy JavaScript is up front.
And in the case of Rabbit, in the case of JavaScript can also be used in the backend.
But JavaScript in Frappé and ERP next is used for front end stuff.
So JavaScript is used to control what happens here.
What happens in this, would they use outside?
But then Python is used for backend.
So what happens in the backend after the user has submitted this data before the thing goes into the
database, something needs to happen.
Some things may need to happen and you may need to process some things inside Python not we will not
do that in frappé.
So you may need to write things inside of inside of.
You are controllers in the in our Kizzia our controllers are in Python.
So that is the difference.
OK, you are saying the controller is stronger than the JavaScript.
The more robust solution you put, if you put the validation or control in the controller, find no
way to go to the database.
Maybe you missed something in the front end.
Just make up the same makeup in the front end.
Some validation feels empty or it is not accepted.
That controller, it will not pass the data to database unless it validate all conditions.
Yes, correct, correct.
The other point to note here is that every code that you write on the front end is accessible to front
end.
So people, even if they don't have access to it, especially Howcast, they can be able to manipulate
code that is running on JavaScript files, but they are not able to manipulate code unless if if the
endpoints are open, they are not able to manipulate code that is on the server on the server side of
your application.
So that's another big difference to note.
It is the last time we did some got together to fetch the full name, you remember?
Yes, yes.
You have that right.
Let me see.
It caused all the obvious focus.
I think I deleted it.
What they have here is to calculate the total cost of the total cost of the total cost of a book or
an article.
OK, I can share my screen to show you a case.
Please go ahead.
You see on my screen.
Yes, it's coming up, yes, now in my screen, if this filled full name is it is written by the court,
it's open to called.
There is a God you remember the full name is Fitchett from.
From the control room, I'll show you.
In.
The time to remember this, this is the call.
Yeah, OK, yeah, so here before saving, we are writing fullName.
This is the full name.
It's his first name concatenated with the last year years here.
My first name, last name and the full name, OK.
Normally it is empty like this.
When you enter data it was empty.
If I see you, if I say now I got the full name from the database once to refresh it, the record was
inefficient.
It is fitchett from database.
Right?
Go back to my dorm so I could work it to fit, right?
Yes.
So full name is populated by code.
Correct, yes.
Now, the experience now, which I did, I suppose I put to number two here in the fullname my right
to hear.
So the system says Frappier will not take my entry in the fullname.
It's not taking my entry into full name.
It is not taking my entry in the front end if I save.
Again, it's running the Python code and derived from the code, not from.
Yes, let me tell you why.
Go back to good to your code.
So what is happening here?
You see, you have done that before, Steve, so that when before C..
So before you are code is saved, your application is taking the first name, whatever is in the first
name field and whatever is in the second, the last name field.
And then it is putting them together and then it is putting that result in their full name field.
So that happens and then it goes ahead and saves.
Yes.
So your application, that is where you will not get even if you put something in the full name field,
it will be overridden by this because it is happening before you see.
Yes, yes, it's ignoring it is ignoring this one and ignoring.
Because it's this cold is more high priority to be executed.
Yes, yes, yes.
So if, for instance, you misspelled your name, if your name is Mummie four, five, six, your second
name, you need to change that in your last name.
So if you do they for five, six, it is going to accept.
Yes.
Actually, this is what my observation that if even you write something in the front end, the God,
it's all right, it's ignoring it is ignore it.
Whatever you enter here, it's ignored.
So the python code is working.
Once it's working, it is overriding whatever interest in the front end is.
Correct.
That's why they put, for example, if you in this case, you put it as Read-Only.
Yes, he is correct.
Yeah, yeah.
So that's it.
Thank you.
So let's get a question from the team.
So now today he's trying to explain the controller file, what he doing exactly, so he put some logic
in the controller file to validate the timetable.
We saw also tried to get created.
The link is between the parent and the child.
Parent record and child record was designed to do so.
Let us know, is it clear this topic like this we have we took this is our first topic from the advanced
that's working with controllers or industrial entropic framework.
So it's clear we didn't see a screen and we will see maybe another test cases coming.
Decisions maybe, or.
OK.
Mummy, Mummy, you think you didn't see a out?
Oh, no, I mean, today we didn't just a squirrel, a squirrel.
So the topic.
Yeah, the topic is working with controllers Aughrim and Asprin.
Yeah.
Ask you and ask you is what we have been doing like when we are when you are getting the when you are
getting the description of the tipoffs.
Oh, yeah, let me say this.
Remember, I ask you, it is very, very broad, so we cannot cover everything.
Can you see my screen?
Yes, yes.
So this is one example of Estherville.
We are getting this.
You may also be able to get like what you are doing here, selecting him from this.
So this is raw as you are, right?
It's it's a it's a large, large ludger.
There's a lot of content to learn from Estherville.
So what we did here is just the commands that you can use maybe to get the description of a table where
you don't have access to my admin or whatever you're using to manage.
You are Easton's virtual reality.
That is that is what I meant by you out here.
You know, my my expectation actually when I read this topic, it's like we did last time and we have
created an API.
You remember, you create an API and you execute DB for capital to be is good right now.
Yeah.
OK, ok, so this is the scroll inside the it's one database API.
Yes.
This part I think we will see it in other tests.
Yeah.
We are going to be, we are going to be working on them as we move along.
But my disclaimer is we can't cover everything enescu ill.
So if, if maybe for some, maybe people I not explored this will I would strongly advise that they
look at courses on Askia.
It's really broad.
No, no.
My point garani again and your controller you can write this could write to fetch data.
It's not only get data, get the.
Yeah, I mean, you can write this, we have done it before, right?
Yes, yes, this is the point.
Yeah, yeah, yeah.
This is the point.
And the controller, you can fetch data using Istria.
Hmm.
You got a name.
So we have to include a school in the country.
Oh, yes, yes, yes, yes, yes.
This is the point.
So this is what means in the topic at this point.
Right.
OK.
So we saw some cases already.
We cover this in previous topics in the beginning so we can explore more cases coming and decisions.
Sure, sure.
Sure.
Only this is the only option, I think, to include the school and the controller.
This one this the debate of the school.
Right.
Not the others.
The others.
Mm.
Yeah.
We can get through that later.
OK.
And also if, if maybe someone has a specific question they can drop it to you.
You can look at it is.
OK, fine.
So I hope it is covering the topic.
So regarding controller.
So if there is no question, we shall close the call.
Is.
Just one question, yeah, yeah, Karen, could you open your visual studio code and the code which
you have written just now?
Hello.
I do, yeah, you see my screen.
Yes, I can see a screen, OK?
Could I have highlighted the.
So you have written one more function before
this function, before revalidate, after that function.
You have written Wendler function before safe.
Yes, yeah, yeah, so what about this thing, is this being used or anything like this, this one?
Yeah, no, we did this earlier.
This is something we did earlier.
So it's not it's not useful for what we have done today or this is something we did on on our previous
session.
Yes.
Yeah, yeah, yeah.
That said yesterday.
Right.
Yes.
Was it is today, I think it was a couple of days ago.
It was not yesterday.
It was working with.
So when was that working with emails?
It was about emails two days earlier in the day, in day nine.
And then it was indeed correct.
Yes.
Do it soon.
So basically the code gets executed when the relevant fields access to data and then that is accessed,
the court will just as it is.
Yes.
Which which field, which field in which field.
So the email came in code, which Garani had written.
So since we haven't used that email part here.
So that's why that code did not yet executed at midnight.
No, if they execute that, actually, if we don't comment everything really just the movies you see
here, we have a message print at the bottom.
You're seeing articles, even animals, Cynthia.
So if this goes on successfully, if the valeted function is successful, we are expecting to see Assif
message on the bottom side of our screen and also see a message print, because this this function will
be reached also and it will do its thing.
But if this one fails, we are not going to see this.
Let me show you that I go to my front end and here this one is not checked.
So we are not expecting to see anyone here.
I don't think this yeah, this article does not track by us.
OK, so we are only one minutes now.
How about so that means this this is what was printed.
These are through here and therefore this function was not reached.
Now how about we check this one invaded that failed because we have this, this, this, this.
Biagio, if we check this and allow the doctor to track by us and to see if we are seeing a message
print article saved, an e-mail sent that one is coming from here.
So this one reads.
For instance, if, for instance, we will change this message print in this case, because the message
print does not stop the execution of these other functions, we are expecting to see a misprint.
One seeing this article does not track by us and by then this will go ahead and also save it.
So we are expecting to see also this this other other message is go ahead and try it out.
So we can leave this one sect it.
You see this one, we have two messages.
So we have to drop and also the other one thing, the other message, so if the execution continues,
if there is the validity, function is successful.
Thank you.
Overall, Garani, there is a throw error message.
The code is get stopped, whatever this will happen and this will not continue the the rest of the code,
right?
Absolutely.
It will exit.
Absolutely.
Yes.
It will not take next admitted or next function.
It will not.
Even if we hit something here like below here we had some other code that was running here and whatever,
whatever, whatever.
And then this thing is if response returns through and the execution comes here, these are the code
will not be executed, even if it is in the same function they control will be stopped at this point.
OK, yeah.
Uh.
Great.
OK, any other question is.
OK.
So if there is no question, we shall close the call.
And so, Bernard, you can stay with us.
We'll try to work on your questions after this.
We thank you very much.
Thank you for your time.
And see you Monday.
Thank you.
Know, for how long we can we stay a few minutes after you finish work with Bernard.
Uh, I will get back to you, since you him.
I will get back to you, OK?
I don't know how much time we need with not so I'll get back to you.
But you are
OK with that.
I'm OK.
Thank you.
Thank you for your attendance today.
I just stopped recording.